-- GENERATED SPELL FOR [Coilfang Fathom-Witch] --


function spell0_21299(pUnit, Event) --@Domination,n/a--
pUnit:FullCastSpellOnTarget(38626,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21299', 10348, 1)
end

function spell1_21299(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(38628,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21299', 615, 1)
end

function spell2_21299(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(38627,pUnit)
pUnit:RegisterEvent('Sorts_21299', 15256, 1)
end

function Sorts_21299(pUnit, Event)
local choix_sorts_21299 = math.random(0, 2)
if choix_sorts_21299 == 0 then
pUnit:RegisterEvent('spell0_21299', 1, 1)
end
if choix_sorts_21299 == 1 then
pUnit:RegisterEvent('spell1_21299', 1, 1)
end
if choix_sorts_21299 == 2 then
pUnit:RegisterEvent('spell2_21299', 1, 1)
end
end

function mob21299_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21299', math.random(1500, 3000), 1)
end

function mob21299_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21299_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21299_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21299, 1, 'mob21299_Action')
RegisterUnitEvent(21299, 2, 'mob21299_Leave')
RegisterUnitEvent(21299, 3, 'mob21299_Kill')
RegisterUnitEvent(21299, 4, 'mob21299_Die')
